package fct.mpc.utils;

import java.util.ArrayList;

import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class SnipeMarker extends ItemizedOverlay<OverlayItem> 
{
	ArrayList<OverlayItem> overlays;
	
    public SnipeMarker(Drawable defaultMarker)
    {
    	super(boundCenter(defaultMarker));
    	
    	overlays = new ArrayList<OverlayItem>();
    	populate();
    }
 
    public void addOverlay(OverlayItem overlay)
    {
    	overlays.add(overlay);
    	populate(); 
    } 
 
    @Override 
    protected OverlayItem createItem(int i)
    {
    	return overlays.get(i); 
    }
    
    public void removeItem(int i)
    {
    	overlays.remove(i); 
    	populate(); 
    }
    
    @Override 
    public int size()
    { 
        return overlays.size(); 
    }
}